package cn.lijiajia3515.cairo.auth.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer;

@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true, jsr250Enabled = true)
@Configuration(proxyBeanMethods = false)
public class SecurityConfig {


	/**
	 * 路由白名单设置
	 *
	 * @return security config
	 */
	// @Bean
	// WebSecurityCustomizer myWebSecurityCustomizer() {
	// 	return (web) -> web
	// 		.ignoring()
	// 		.antMatchers(HttpMethod.OPTIONS, "/**")
	// 		.antMatchers( "/actuator/**", "/favicon.ico", "**/favicon.ico", "/public/**")
	// 		// .antMatchers("/.well-known/**")
	// 		;
	// }
}
